import request from '@/utils/request'
import qs from 'qs'
interface User {
  phone: string
  password: string
}
const login = (data: User) => {
  return request({
    method: 'POST',
    url: '/front/user/login',
    data: qs.stringify(data)
  })
}

const getUserInfo = () => {
  return request({
    method: 'get',
    url: '/front/user/getInfo'
  })
}

const getUserPages = (data: any) => {
  return request({
    method: 'POST',
    url: '/boss/user/getUserPages',
    data
  })
}

const forbidUser = (userId: string | number) => {
  return request({
    method: 'POST',
    url: '/boss/user/forbidUser',
    params: {
      userId
    }
  })
}
export {
  getUserInfo,
  login,
  getUserPages,
  forbidUser
}
